#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 110;

int n;
int ne[N];
int res[N];
int temp;
/*
解法：通过诸如11111211111， 22222122222来构造一个链表，存储着元素和元素之间的大小关系
1、111111211111 能找到左边比x大的元素
2、222222122222 能找到左边比x小的元素

最终构造出一条链，是一条首尾相接的链
*/

int main(){
	cin >> n;

    for(int i = 1; i <= n; i ++){
        cout << "? ";
        for(int j = 1; j <= n; j ++){
            if(i == j) cout << 2 << " ";
            else cout << 1 << " ";
        }
        cout << endl;
        cin >> temp;
        if(temp != i) ne[i] = temp;

        cout << "? ";
        for(int j = 1; j <= n; j ++){
            if(i == j) cout << 1 << " ";
            else cout << 2 << " ";
        }
        cout << endl;
        cin >> temp;
        if(temp != i) ne[temp] = i;
    }

    int now = ne[0], idx = 0;
    while(now) res[now] = ++idx, now = ne[now];

    cout << "! ";
    for(int i = 1; i <= n; i ++) cout << res[i] << " ";

    return 0;
}